<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.domain.ZhongLei,java.util.ArrayList,com.domain.*"%>

<%
YongHu yonghu=(YongHu)session.getAttribute("yonghu");

if(yonghu==null || !yonghu.getQuanxian().equals("guanliyuan"))
{
	request.getRequestDispatcher("guanliyuandenglu.jsp").forward(request, response);
}

ArrayList<YongHu> quanbuyonghu=(ArrayList<YongHu>)session.getAttribute("quanbuyonghu");
if(quanbuyonghu==null)
{
	request.getRequestDispatcher("Huoquzhanhao").forward(request, response);
}

String zhixingjieguo=(String)session.getAttribute("zhixingjieguo");
if(zhixingjieguo==null)
	zhixingjieguo="";
session.removeAttribute("zhixingjieguo");

%>


<html>
  <head>
	  <style>A{text-decoration: NONE} </style>
	  <title>管理账号</title>
  </head>
  <body bgcolor="#d0eed8" >
	<div align="center"> <font size="7"><%=zhixingjieguo%></font></div>
 	<table width="80%" align="center" border="1" cellpadding="20">
 	<colgroup width="20%" span="4">
		<tr height="200" align="center">
			<td colspan="4" ><font size="7"><a href="houtaishouye.jsp">返回首页</a></font></td>			
		</tr>
		<tr height="200" align="center">
			<td colspan="2" ><font size="7">当前账号:<%=yonghu.getYonghuming() %></font></td>			
			<td colspan="2" ><font size="7"><a href="Tuichu">退出</a></font></td>			
		</tr>
		<tr height="200" align="center">
		<form action="Guanlizhanghao?caozuo=tianjia" method="post">
			<td align="left"><font size="5">用户名：<input name="yonghuming"  type="text"/></font></td>	
			<td><font size="5">密&nbsp;&nbsp;&nbsp;&nbsp;码：<input name="mima1"  type="password"/></font></td>
			<td><font size="5">root密码：<input name="mima2"  type="password"/></font></td>
			<td><font size="5"><input name="submit1" value="添加账号" type="submit" /></font></td>	
		</form>	
		</tr>
		
		<tr height="200" align="center">
		<form action="Guanlizhanghao?caozuo=gaimi&yonghuming=root" method="post">
			<td align="left"><font size="5">用户名：root</font></td>	
			<td><font size="5">原&nbsp;密&nbsp;码：<input name="mima1"  type="password"/></font></td>
			<td><font size="5">新&nbsp;密&nbsp;码：<input name="mima2"  type="password"/></font></td>
			<td><font size="5"><input name="submit1" value="修改密码" type="submit" /></font></td>	
		</form>	
		</tr>
<%
		for(int i=0;i<quanbuyonghu.size();i++)//
		{
%>
		<tr height="100" align="center">
			<td rowspan="2" align="left"><font size="5">用户名：<%=quanbuyonghu.get(i).getYonghuming() %></font></td>	
			<form action="Guanlizhanghao?caozuo=gaimi&yonghuming=<%=quanbuyonghu.get(i).getYonghuming()%>" method="post">
				<td><font size="5">原&nbsp;密&nbsp;码：<input name="mima1"  type="password"/></font></td>
				<td><font size="5">密&nbsp;&nbsp;&nbsp;&nbsp;码：<input name="mima2"  type="password"/></font></td>
				<td><font size="5"><input name="submit1" value="修改密码" type="submit" /></font></td>	
			</form>	
		</tr>
		<tr height="100" align="center">
			<form action="Guanlizhanghao?caozuo=shanchu&yonghuming=<%=quanbuyonghu.get(i).getYonghuming()%>" method="post">
				<td><font size="5">账号密码：<input name="mima1"  type="password"/></font></td>
				<td><font size="5">root密码：<input name="mima2"  type="password"/></font></td>
				<td><font size="5"><input name="submit1" value="删除账号" type="submit" /></font></td>	
			</form>	
		</tr>		
<%
		}
%>
		
		
	</table>
  </body>
</html>
